<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增服务节点')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-slave-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">服务器名称：</label>
                <div class="col-sm-8">
                    <input name="name" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">主机名：</label>
                <div class="col-sm-8">
                    <input name="hostName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">端口：</label>
                <div class="col-sm-8">
                    <input name="port" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">webAppName：</label>
                <div class="col-sm-8">
                    <input name="webAppName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">用户名：</label>
                <div class="col-sm-8">
                    <input name="username" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">密码：</label>
                <div class="col-sm-8">
                    <input name="password" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">代理主机名：</label>
                <div class="col-sm-8">
                    <input name="proxyHostName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">代理端口：</label>
                <div class="col-sm-8">
                    <input name="proxyPort" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是主服务器：</label>
                <div class="col-sm-8">
                    <select name="master" class="form-control m-b" th:with="type=${@dict.getType('kettle_master')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "kettle/slave"
        $("#form-slave-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-slave-add').serialize());
            }
        }
    </script>
</body>
</html>